package second;
import second.student;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;
public class st
{

    public static void main(String []args)
        {  /* ArrayList<car> m=new ArrayList<car>();
            car h=new car();
            h.id=1;
            h.name="qw";
            m.add(h);
            m.toString();*/
            ArrayList<Integer> m=new ArrayList<>();
            m.add(1);
            m.add(2);
            String w=m.toString();
           // [1, 2]
            System.out.println(m.toString());

            w=w.replace("[","");
               w=w.replace("]","");
            System.out.println(w);

         /*   double aver=0;
            int MAX=-1,MIN=1000000;
               Scanner sc=new Scanner(System.in);
              ArrayList<student>a=new ArrayList<>();
            int []b=new int [200];


          int op;
          while(true)
          {
              op = sc.nextInt();
              if (op == 1)//添加
              {  student temp=new student();
                  temp.num = sc.nextInt();
                  temp.name = sc.next();
                  temp.sno = sc.next();
                  temp.classes = sc.next();
                  temp.score = sc.nextInt();

                  a.add(temp);
                 // b.add(temp);
              }
              else if (op == 2)//删除
              {

                  sc.nextLine();
                  System.out.println("要被删除的学号:");
                  String h = sc.next();

                  for (int i = 0; i < a.size(); i++) {

                      if (a.get(i).sno.equals(h)) {
                          a.remove(i);
                      }
                  }
                  System.out.println("删除完毕");
              }
              else if (op == 3)//修改
              {

                  sc.nextLine();
                  System.out.println("输入被修改的学号");
                  String h = sc.next();
                  System.out.println("要修改为多少分：");
                  int scscsc = sc.nextInt();
                  for (int i = 0; i < a.size(); i++)
                  {

                      if (a.get(i).sno.equals(h))
                      {

                          student scsc=new student(a.get(i));
                          scsc.score=scscsc;
                          a.set(i,scsc);
                      }
                  }

                  System.out.println("修改完毕");
              }
              else if (op == 4)//遍历
              {
                  System.out.println("所有人的成绩“：");
                  for (int i = 0; i < a.size(); i++)
                  {
                      System.out.print(a.get(i).score + " ");
                  }
                  System.out.println();
              }
              else if (op == 5)//最高分
              {
                  double sum=0;
                  for(int i=0;i<a.size();i++)
                  {
                      sum+=a.get(i).score;
                      if(a.get(i).score>MAX)
                      {
                          MAX=a.get(i).score;
                      }
                      if(a.get(i).score<MIN)
                      {
                          MIN=a.get(i).score;
                      }
                  }
                  aver=sum/a.size();

                  System.out.println("平均分："+aver);
                  System.out.println("max分："+MAX);
                  System.out.println("min分："+MIN);

              }
              else if(op==6)//查找
              {
                  sc.nextLine();
                  System.out.println("要查找的学号:");
                  String h=sc.next();
                  for(int i=0;i<a.size();i++)
                  {
                      if(a.get(i).sno.equals(h))
                      {
                          System.out.print("成绩是：");
                          System.out.println(a.get(i).score);
                          break;
                      }
                  }
              }
              else if(op==7)
              {
                  System.out.println("从高到低：");
                  for(int i=0;i<a.size();i++)
                  {


                      b[i]=a.get(i).score;

                  }
                 // Arrays.sort(b);
                  Arrays.sort(b,0,a.size());
                  for(int i=a.size()-1;i>=0;i--)
                  {
                      if(b[i]!=0)System.out.println(b[i]);
                  }}
              else
              {
                  return;
              }


          }
*/



       }
}
